<?php
/**
 * Created by PhpStorm.
 * User: Michael Ma
 * Date: 2017/4/16
 * Time: 22:02
 */

header("Content-Type: text/plain;charset=utf-8");
header("Access-Control-Allow-Origin:*");
header("Access-Control-Methods:POST,GET");

//载入user类
require_once ("classes/user.php");

//接收前台传来的数据
$taskId = $_POST['taskId'];

//实例化类
$payTask = new User($taskId);
$result = $payTask -> payTask();
if (!$result){
    $error = "错误";
}
echo json_encode($error,JSON_UNESCAPED_UNICODE);

?>